using Game.Networking.Events;
using SMGCore.EventSys;
using UnityEngine;

namespace Game.UI {
	public sealed class ClientLoadingImage : MonoBehaviour {
		private void Awake() {
			EventManager.Subscribe<OnConnectedToServer>(this, OnConnected);
		}

		private void OnDestroy() {
			EventManager.Unsubscribe<OnConnectedToServer>(OnConnected);
		}

		void OnConnected(OnConnectedToServer e) {
			gameObject.SetActive(false);
		}
	}
}
